<template>
	<view class="pageview">
		<cl-navbar  leftIconSize="40rpx" placeholder :title="title" autoBack>
		</cl-navbar>
		<div v-html="content" style="margin: 30rpx;"></div>
		<u-loading-page :loading="loading" bg-color="#ededed" loadingText=""></u-loading-page>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:0,
				title:this.$t('login.agreement.title'),
				content:'',
				loading:true
			};
		},
		onLoad(options) {
			this.type = options.type
			if(this.type == '0'){
				this.title = this.$t('login.agreement.title')
			}else{
				this.title = this.$t('login.agreement.title1')
			}
			this.getinfo()
		},
		methods: {
			async getinfo(){
				try{
					let res = await uni.$api.common.getAgreement({
						plat_code:uni.$config.plat_code,
						agreement_type:this.type
					})
					if(res.data){
						this.content = res.data.content
					}
				}catch(e){
					
				}finally{
					this.loading = false
				}
			}
		}
	};
</script>

<style>
</style>